package com.bt.lms.ui.page.enp;

import com.bt.lms.ui.action.enp.CancelEnrollmentPlanBtnAction;
import com.bt.lms.main.BotLmsApp;
import com.bt.lms.ui.page.sys.style.BtnStyle;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;

/**
 * 招生计划名称详情界面
 */
public class DetailEnrollmentPlan extends VBox {

    private Integer width = BotLmsApp.PER_WIGHT;
    private Integer height = BotLmsApp.HEIGHT;


    public DetailEnrollmentPlan() {

        this.setPrefHeight(900);
        this.setPrefWidth(1280);

        //当前位置
        HBox locationHBox = new HBox();
        locationHBox.setPadding(new Insets(15, 15, 15, 15));
        locationHBox.setPrefWidth(width);
        double locationHBoxHeight = height * 0.05;
        locationHBox.setPrefHeight(locationHBoxHeight);
        Label label1 = new Label("当前位置：🏠>招生管理>招生计划管理>查看招生计划");
        Font font = Font.font("仿宋", FontWeight.THIN, FontPosture.REGULAR, 18);
        label1.setFont(font);
        locationHBox.getChildren().add(label1);
        this.getChildren().add(locationHBox);

        //招生计划编号盒子
        HBox codeHBox = new HBox();
        codeHBox.setSpacing(60);
        codeHBox.setPadding(new Insets(15, 15, 15, 15));
        double codeHBoxHeight = height * 0.05;
        codeHBox.setPrefHeight(codeHBoxHeight);
        codeHBox.setPrefWidth(width);
        Label codeLb = new Label("招生计划编号");
        codeLb.setPrefWidth(100);
        Label codeDataLb = new Label("3487324274284");
        codeHBox.getChildren().addAll(codeLb, codeDataLb);

        //计划名称盒子
        HBox nameHBox = new HBox();
        nameHBox.setSpacing(60);
        nameHBox.setPadding(new Insets(15, 15, 15, 15));
        double nameHBoxHeight = height * 0.05;
        nameHBox.setPrefHeight(nameHBoxHeight);
        nameHBox.setPrefWidth(width);
        Label nameLb = new Label("计划名称");
        nameLb.setPrefWidth(100);
        Label nameDataTf = new Label("网联培训计划");
        nameHBox.getChildren().addAll(nameLb, nameDataTf);

        //计划内容盒子
        HBox contentHBox = new HBox();
        contentHBox.setSpacing(60);
        contentHBox.setPadding(new Insets(15, 15, 15, 15));
        double contentHBoxHeight = height * 0.1;
        contentHBox.setPrefHeight(contentHBoxHeight);
        contentHBox.setPrefWidth(width);
        Label contentLb = new Label("计划内容");
        contentLb.setPrefWidth(100);
        Label contentDataLb = new Label("为了更好的开展全国教师的培训，安博教育集团 为了更好的开展全国教师的培训，\n" +
                "安博教育集团 为了更好的开展全国教师的培训，安博教育集团 为了更好的开展全国教师的培训，\n" +
                "安博教育集团 为了更好的开展全国教师的培训，安博教育集团");
        contentDataLb.setMinHeight(70);
        contentHBox.getChildren().addAll(contentLb, contentDataLb);


        //招生院校盒子
        HBox schoolHBox = new HBox();
        schoolHBox.setSpacing(60);
        schoolHBox.setPadding(new Insets(15, 15, 15, 15));
        double schoolHBoxHeight = height * 0.05;
        schoolHBox.setPrefHeight(schoolHBoxHeight);
        schoolHBox.setPrefWidth(width);
        Label schoolLb = new Label("招生院校");
        schoolLb.setPrefWidth(100);
        Label schoolDataLb = new Label("北京师范大学");
        schoolHBox.getChildren().addAll(schoolLb, schoolDataLb);


        //招生层次盒子
        HBox levelHBox = new HBox();
        levelHBox.setSpacing(60);
        levelHBox.setPadding(new Insets(15, 15, 15, 15));
        double levelHBoxHeight = height * 0.05;
        levelHBox.setPrefHeight(levelHBoxHeight);
        levelHBox.setPrefWidth(width);
        Label levelLb = new Label("招生层次");
        levelLb.setPrefWidth(100);
        Label levelDataLb = new Label("免费师范生");
        levelHBox.getChildren().addAll(levelLb, levelDataLb);

        //招生专业盒子
        HBox specialtyHBox = new HBox();
        specialtyHBox.setSpacing(60);
        specialtyHBox.setPadding(new Insets(15, 15, 15, 15));
        double specialtyHBoxHeight = height * 0.05;
        specialtyHBox.setPrefHeight(specialtyHBoxHeight);
        specialtyHBox.setPrefWidth(width);
        Label specialtyLb = new Label("招生专业");
        specialtyLb.setPrefWidth(100);
        Label specialtyDataLb = new Label("学科教育");
        specialtyHBox.getChildren().addAll(specialtyLb, specialtyDataLb);


        //招生人数盒子
        HBox enPopulationHBox = new HBox();
        enPopulationHBox.setSpacing(60);
        enPopulationHBox.setPadding(new Insets(15, 15, 15, 15));
        double enPopulationHBoxHeight = height * 0.05;
        enPopulationHBox.setPrefHeight(enPopulationHBoxHeight);
        enPopulationHBox.setPrefWidth(width);
        Label enPopulationLb = new Label("招生人数");
        enPopulationLb.setPrefWidth(100);
        Label enPopulationDataLb = new Label("657人");
        enPopulationHBox.getChildren().addAll(enPopulationLb, enPopulationDataLb);

        //关联教学计划盒子
        HBox associationItemsHBox = new HBox();
        associationItemsHBox.setSpacing(60);
        associationItemsHBox.setPadding(new Insets(15, 15, 15, 15));
        double associationItemsHBoxHeight = height * 0.05;
        associationItemsHBox.setPrefHeight(associationItemsHBoxHeight);
        associationItemsHBox.setPrefWidth(width);
        Label associationItemsLb = new Label("关联教学计划");
        associationItemsLb.setPrefWidth(100);
        associationItemsHBox.getChildren().addAll(associationItemsLb);

        //学习年限盒子
        HBox studyYearHBox = new HBox();
        studyYearHBox.setSpacing(60);
        studyYearHBox.setPadding(new Insets(15, 15, 15, 15));
        double studyYearHBoxHeight = height * 0.05;
        studyYearHBox.setPrefHeight(studyYearHBoxHeight);
        studyYearHBox.setPrefWidth(width);
        Label studyYearLb = new Label("学习年限");
        studyYearLb.setPrefWidth(100);
        Label studyYearDataLb = new Label("24个月");
        studyYearHBox.getChildren().addAll(studyYearLb, studyYearDataLb);

        //学习学费盒子
        HBox tuitionHBox = new HBox();
        tuitionHBox.setSpacing(60);
        tuitionHBox.setPadding(new Insets(15, 15, 15, 15));
        double tuitionHBoxHeight = height * 0.05;
        tuitionHBox.setPrefHeight(tuitionHBoxHeight);
        tuitionHBox.setPrefWidth(width);
        Label tuitionLb = new Label("学习学费");
        tuitionLb.setPrefWidth(100);
        Label tuitionDataLb = new Label("3468元");
        tuitionHBox.getChildren().addAll(tuitionLb, tuitionDataLb);

        //报名起止时间盒子
        HBox timeHBox = new HBox();
        timeHBox.setSpacing(60);
        timeHBox.setPadding(new Insets(15, 15, 15, 15));
        double timeHBoxHeight = height * 0.05;
        timeHBox.setPrefHeight(timeHBoxHeight);
        timeHBox.setPrefWidth(width);
        Label timeLb = new Label("报名起止时间");
        timeLb.setPrefWidth(100);
        Label timeDataLb = new Label("2011-09-12 至2012-09-11");
        timeHBox.getChildren().addAll(timeLb, timeDataLb);


        //报名地点盒子
        HBox enrollmentLocationHBox = new HBox();
        enrollmentLocationHBox.setSpacing(60);
        enrollmentLocationHBox.setPadding(new Insets(15, 15, 15, 15));
        double enrollmentLocationHBoxHeight = height * 0.05;
        enrollmentLocationHBox.setPrefHeight(enrollmentLocationHBoxHeight);
        enrollmentLocationHBox.setPrefWidth(width);
        Label enrollmentLocationLb = new Label("报名地点");
        enrollmentLocationLb.setPrefWidth(100);
        Label enrollmentLocationDataLb = new Label("北京市朝阳区对外经贸大学");
        enrollmentLocationHBox.getChildren().addAll(enrollmentLocationLb, enrollmentLocationDataLb);

        //联系人盒子
        HBox LtdContactHBox = new HBox();
        LtdContactHBox.setSpacing(60);
        LtdContactHBox.setPadding(new Insets(15, 15, 15, 15));
        double LtdContactHBoxHeight = height * 0.05;
        LtdContactHBox.setPrefHeight(LtdContactHBoxHeight);
        LtdContactHBox.setPrefWidth(width);
        Label LtdContactLb = new Label("联系人");
        LtdContactLb.setPrefWidth(100);
        Label LtdContactDataLb = new Label("李舒淇");
        LtdContactHBox.getChildren().addAll(LtdContactLb, LtdContactDataLb);

        //电话盒子
        HBox phoneHBox = new HBox();
        phoneHBox.setSpacing(60);
        phoneHBox.setPadding(new Insets(15, 15, 15, 15));
        double phoneHBoxHeight = height * 0.05;
        phoneHBox.setPrefHeight(phoneHBoxHeight);
        phoneHBox.setPrefWidth(width);
        Label phoneLb = new Label("电话");
        phoneLb.setPrefWidth(100);
        Label phoneDataLb = new Label("13503593935");
        phoneHBox.getChildren().addAll(phoneLb, phoneDataLb);

        //电子邮箱
        HBox emailHBox = new HBox();
        emailHBox.setSpacing(60);
        emailHBox.setPadding(new Insets(15, 15, 15, 15));
        double emailHBoxHeight = height * 0.05;
        emailHBox.setPrefHeight(emailHBoxHeight);
        emailHBox.setPrefWidth(width);
        Label emailLb = new Label("电子邮箱");
        emailLb.setPrefWidth(100);
        Label emailDataLb = new Label("zhongzheng_009@q63.com");
        emailHBox.getChildren().addAll(emailLb, emailDataLb);

        //报名材料盒子
        HBox materialsHBox = new HBox();
        materialsHBox.setSpacing(60);
        materialsHBox.setPadding(new Insets(15, 15, 15, 15));
        double materialsHBoxHeight = height * 0.05;
        materialsHBox.setPrefHeight(materialsHBoxHeight);
        materialsHBox.setPrefWidth(width);
        Label materialsLb = new Label("报名材料");
        materialsLb.setPrefWidth(100);
        Label materialsDataLb = new Label("身份证、照片、学历证书、学位证书");
        materialsHBox.getChildren().addAll(materialsLb, materialsDataLb);

        //报名事项盒子
        HBox itemsHBox = new HBox();
        itemsHBox.setSpacing(60);
        itemsHBox.setPadding(new Insets(15, 15, 15, 15));
        double itemsHBoxHeight = height * 0.1;
        itemsHBox.setPrefHeight(itemsHBoxHeight);
        itemsHBox.setPrefWidth(width);
        Label itemsLb = new Label("报名事项");
        itemsLb.setPrefWidth(100);
        Label itemsDataLb = new Label("入学考试相关内容介绍");
        itemsHBox.getChildren().addAll(itemsLb, itemsDataLb);

        //毕/结业相关事项盒子
        HBox graduateHBox = new HBox();
        graduateHBox.setSpacing(60);
        graduateHBox.setPadding(new Insets(15, 15, 15, 15));
        double graduateHBoxHeight = height * 0.1;
        graduateHBox.setPrefHeight(graduateHBoxHeight);
        graduateHBox.setPrefWidth(width);
        Label graduateLb = new Label("毕/结业相关事项");
        graduateLb.setPrefWidth(100);
        Label graduateDataLb = new Label("事发时发生");
        graduateHBox.getChildren().addAll(graduateLb, graduateDataLb);

        //补充说明盒子
        HBox replenishHBox = new HBox();
        replenishHBox.setSpacing(60);
        replenishHBox.setPadding(new Insets(15, 15, 15, 15));
        double replenishHBoxHeight = height * 0.1;
        replenishHBox.setPrefHeight(replenishHBoxHeight);
        replenishHBox.setPrefWidth(width);
        Label replenishLb = new Label("补充说明");
        replenishLb.setPrefWidth(100);
        Label replenishDataLb = new Label("而对佛哇卡死不i神佛侧边粗");
        replenishHBox.getChildren().addAll(replenishLb, replenishDataLb);

        //返回按钮盒子
        HBox returnBtnHBox = new HBox();
        returnBtnHBox.setAlignment(Pos.CENTER);
        returnBtnHBox.setPadding(new Insets(15, 15, 15, 15));
        double returnBtnHeight = height * 0.1;
        returnBtnHBox.setPrefHeight(returnBtnHeight);
        returnBtnHBox.setPrefWidth(width);
        Button returnBtn = new Button("返回");
        BtnStyle.cancelBtn(returnBtn);
        BtnStyle.cancelBtnAction(returnBtn);
        returnBtnHBox.getChildren().add(returnBtn);
        //加事件
        CancelEnrollmentPlanBtnAction cancelEnrollmentPlanBtnAction = new CancelEnrollmentPlanBtnAction();
        returnBtn.setOnAction(cancelEnrollmentPlanBtnAction);


        //详情大盒子
        VBox detailsVBox = new VBox();
        detailsVBox.setPadding(new Insets(15, 15, 15, 15));
        double totalVBoxHeight = height * 0.95;
        detailsVBox.setPrefHeight(totalVBoxHeight);
        detailsVBox.setPrefWidth(width);
        ScrollPane scrollPane = new ScrollPane();//滚动条
        scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
        scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);//只能竖向滚动不能横向滚动
        scrollPane.setContent(detailsVBox);

        detailsVBox.getChildren().addAll(codeHBox, nameHBox, contentHBox, schoolHBox, levelHBox, specialtyHBox, enPopulationHBox, associationItemsHBox, studyYearHBox, tuitionHBox, timeHBox, enrollmentLocationHBox, LtdContactHBox, phoneHBox, emailHBox, materialsHBox, itemsHBox, graduateHBox, replenishHBox, returnBtnHBox);

        this.getChildren().add(scrollPane);


    }
}